<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020-02-17
 * Time: 11:20
 */

$rand = get_password();
echo $rand.'<br>';

echo sha1(md5('123456').$rand);

function get_password( $length = 8 )

{

    $str = substr(md5(time()), 0, 6);

    return $str;

}

